<template>
    <div id="app">
        <!--      <router-link to="/helloWorld"></router-link>-->
        <!--      <router-link to="/login">登录页&#x3000;</router-link>-->
        <!--      <router-link to="/content">内容页&#x3000;</router-link>-->
        <!--      <img src="./assets/logo.png">-->
        <router-view/>
    </div>
</template>

<script>
    export default {
        name: 'App',
        mounted: function () {
            window.addEventListener('unload', this.saveState);
        },
        methods: {
            saveState() {
                sessionStorage.setItem('state', JSON.stringify(this.$store.state.user));
            }
        }
    }
</script>

<style>
    #app {
        font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-align: center;
        color: #2c3e50;
        margin-top: 30px;
    }
</style>
